import request from "@/utils/request"

export function clueList(data){
    return request({
        url:"/tienchin/clue/list",
        method:"get",
        params: data
    })
}


export function channels(data){
    return request({
        url:"/tienchin/clue/channels",
        method:"get",
        params: data
    })
}

// 线索状态
export function clueStatus(){
    return request({
        url:"/system/dict/data/type/clue_status",
        method:"get",
    })
}

//查询
export function activity(id){
    return request({
        url:"/tienchin/clue/activity/" + id,
        method:"get",
    })
}

// 添加
export function clueAdd(datas){
    return request({
        url:"/tienchin/clue",
        method:"post",
        data:datas
    })
}

// 删除
export function clueDel(id){
    return request({
        url:"/tienchin/clue/" + id,
        method:"delete",
    })
}

//根据id查询数据
export function summary(id){
    return request({
        url:"/tienchin/clue/summary/" + id,
        method:"get",
    })
}

// 修改
export function clueEdit(datas){
    return request({
        url:"/tienchin/clue" ,
        method:"put",
        data:datas
    })
}

// 导出
export function exportClue(data){
    return request({
        url:"/tienchin/activity/export",
        method:"post",
        data,
        // 设置服务器返回的数据类型是个二进制文件对象(blob)
        responseType:"blob"
    })
}
